package org.xxx.epms.admin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xxx.epms.admin.models.AdminPermission;
import org.xxx.epms.admin.service.AdminService;

import java.util.List;

@RestController
@RequestMapping("/adminTest")
@RefreshScope
public class TestController {

    @Autowired
    private AdminService adminService;

    @Value("${test.userId}")
    private String userId;

    @GetMapping("/test")
    public String getUserConfigTest(){
        return userId != null ? userId : "未获取到配置";
    }

}
